// Lang_23 [method references (concatenation)].nova // The application class. class MethodReferencesConcatenationApp { // Application class's "main" function. public static void main( String[] args ) { // Declare some instance method references. String (static)( ) methodRef0 = ExampleClass.method0; String (static)( ) (static)( ) methodRef1 = ExampleClass.method1; String (static)( ) (static)( ) (static)( ) methodRef2 = ExampleClass.method2; // Call the method references. Stream.write( methodRef0( ) ); Stream.write( methodRef1( )( ) ); Stream.write( methodRef2( )( )( ) ); } } // Example class with a static subtraction method. class ExampleClass { public static String method0( ) { return "method0 - called\n"; } public static String (static)( ) method1( ) { return method0; } public static String (static)( ) (static)( ) method2( ) { return method1; } }